package com.googlecode.continuity.plugin.svnbrowser.client;

import java.util.ArrayList;

import com.googlecode.continuity.plugin.svnbrowser.client.wrapper.SVNDirEntryWrapper;

/**
 * SVNBrowserEventListenerCollection
 *
 * @author Peter Schmitt <aragos@aragos.de>
 */
public class SVNBrowserEventListenerCollection extends ArrayList {
  public void fireOnDirectorySelected(String directoryPath) {
    for (int i = 0; i < size(); i++) {
      ((SVNBrowserEventListener) get(i)).onDirectorySelected(directoryPath);
    }
  }

  public void fireOnFileSelected(SVNDirEntryWrapper entry, String filePath) {
    for (int i = 0; i < size(); i++) {
      ((SVNBrowserEventListener) get(i)).onFileSelected(entry, filePath);
    }
  }
}
